/**
 * 
 */
package com.sugou.web.pages;

import java.util.Date;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import freemarker.ext.beans.BeansWrapper;

/**
 * 
 * @version 1.0 
 * @author Hunk.Tong &copy; Ustudy 游学网络
 * <b>Create Time:</b>2012-12-12 上午11:32:17
 */
public class FreemarkerLoaderUtils {
	public static void initLoader(Map<String, Object> model,HttpServletRequest request) throws Exception{
		model.put("enums", BeansWrapper.getDefaultInstance().getEnumModels());
		model.put("base", request.getContextPath());
		model.put("svname", request.getServerName());
		model.put("svport", request.getServerPort());
		model.put("jsessionid", request.getSession().getId());
		model.put("currentTime", new Date());
		model.put("statics", BeansWrapper.getDefaultInstance().getStaticModels());
		model.put("request", request);
	}
	
}
